//
//  UIView+Corner.m
//  Patient
//
//  Created by cokecigar on 16/4/6.
//  Copyright © 2016年 Boundary Technology. All rights reserved.
//

#import "UIView+Corner.h"

@implementation UIView(corner)
@dynamic cornerRadius;
@dynamic borderWidth;
@dynamic borderColor;

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

-(void) setCornerRadius:(CGFloat)cornerRadius{
    self.layer.masksToBounds = YES;
    self.layer.cornerRadius = cornerRadius;
}

-(void) setBorderWidth:(CGFloat)borderWidth{
    self.layer.borderWidth = borderWidth;
}

-(void) setBorderColor:(UIColor *)borderColor{
    if(borderColor == nil)
        return;
    
    self.layer.borderColor = borderColor.CGColor;
}

@end
